package com.ruoyi.operation.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.operation.domain.*;
import com.ruoyi.operation.service.TradeingActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@CrossOrigin
@RequestMapping("/payInfo/logic")
public class TradeingAcitvityController extends BaseController {
    @Autowired
    TradeingActivityService tradeingActivityService;

    @PostMapping("/getTradingActivityInfoByHour")
    @ResponseBody
    public TableDataInfo getTradingActivityInfoByHourList()
    {
        startPage();
        List<TradingActivity> list =tradeingActivityService.getTradeingActivityType("HOUR");
        return getDataTable(list);
    }


    @PostMapping("/getTradingActivityInfoByMonth")
    @ResponseBody
    public TableDataInfo getTradingActivityInfoByMonthList()
    {
        startPage();
        List<TradingActivity> list =tradeingActivityService.getTradeingActivityType("MONTH");
        return getDataTable(list);
    }


    @PostMapping("/getPayWayNum")
    @ResponseBody
    public TableDataInfo getPayWayNumList()
    {
        startPage();
        List<PayWayWIthNum> list =tradeingActivityService.getPayWayNum();
        return getDataTable(list);
    }

    @PostMapping("/getMonthConsumer")
    @ResponseBody
    public TableDataInfo getMonthConsumerList()
    {
        startPage();
        List<MonthPrice> list =tradeingActivityService.getMonthPrice("CONSUMER");
        return getDataTable(list);
    }

    @PostMapping("/getRepayment")
    @ResponseBody
    public TableDataInfo getRepaymentList()
    {
        startPage();
        List<MonthPrice> list =tradeingActivityService.getMonthPrice("REPAYMENT");
        return getDataTable(list);
    }


    @PostMapping("/mechanismUseNum")
    @ResponseBody
    public TableDataInfo mechanismUseNumList()
    {
        startPage();
        List<MechanismUseNum> list =tradeingActivityService.getMechanismUseNumList();
        return getDataTable(list);
    }

    @PostMapping("/getPlatformStatusList")
    @ResponseBody
    public TableDataInfo getPlatformStatusList()
    {
        startPage();
        List<PlatformStatus> list =tradeingActivityService.getPlatformStatusList();
        return getDataTable(list);
    }

    @PostMapping("/getMonthApplyList")
    @ResponseBody
    public TableDataInfo getMonthApplyList()
    {
        startPage();
        List<MonthApply> list =tradeingActivityService.getMonthApplyList();
        return getDataTable(list);
    }

    @PostMapping("/getMonthRefuseList")
    @ResponseBody
    public TableDataInfo getMonthRefuseList()
    {
        startPage();
        List<MonthApply> list =tradeingActivityService.getMonthRefuseList();
        return getDataTable(list);
    }


    @PostMapping("/getPlatformSumCountList")
    @ResponseBody
    public TableDataInfo getPlatformSumCountList()
    {
        startPage();
        List<PlatformSumCount> list =tradeingActivityService.getPlatformSumCountList();
        return getDataTable(list);
    }


    @PostMapping("/getLoanStautsList")
    @ResponseBody
    public TableDataInfo getLoanStautsList()
    {
        startPage();
        List<PlatformStatus> list =tradeingActivityService.getLoanStautsList();
        return getDataTable(list);
    }


    @PostMapping("/getRepayStautsList")
    @ResponseBody
    public TableDataInfo getRepayStautsList()
    {
        startPage();
        List<PlatformStatus> list =tradeingActivityService.getRepayStautsList();
        return getDataTable(list);
    }


    @PostMapping("/getRepayPlatformSumList")
    @ResponseBody
    public TableDataInfo getRepayPlatformSumList()
    {
        startPage();
        List<PlatformSumCount> list =tradeingActivityService.getRepayPlatformSumList();
        return getDataTable(list);
    }


    @PostMapping("/getRepayPlatformMonthNumSumList")
    @ResponseBody
    public TableDataInfo getRepayPlatformMonthSumList()
    {
        startPage();
        List<MonthNumApply> list =tradeingActivityService.getRepayPlatformMonthNumSumList();
        return getDataTable(list);
    }


    @PostMapping("/getUserInfoList")
    @ResponseBody
    public TableDataInfo getUserInfoList()
    {
        startPage();
        List<UserInfo> list =tradeingActivityService.getUserInfoList();
        return getDataTable(list);
    }


    @PostMapping("/getTotalOutputList")
    @ResponseBody
    public TableDataInfo getTotalOutputList()
    {
        startPage();
        List<TotalOutPut> list =tradeingActivityService.getTotalOutputList();
        return getDataTable(list);
    }
}
